package com.hwadee.service.impl;

import com.hwadee.mapper.ReportinfoMapper;
import com.hwadee.pojo.Reportinfo;
import com.hwadee.service.ReportinfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ReportinfoServiceImpl implements ReportinfoService {

    @Autowired
    private ReportinfoMapper mapper;

    @Override
    public List<Reportinfo> getAllReportinfo() {
        return mapper.getAllReportinfo(); // ← 注意调用的 Mapper 方法名也要一致
    }

    @Override
    public void addReport(Reportinfo reportinfo) {
        mapper.addReport(reportinfo);
    }

    @Override
    public void updateReport(Reportinfo reportinfo) {
        mapper.updateReport(reportinfo);
    }

    @Override
    public void deleteReportById(Integer id) {
        mapper.deleteReportById(id);
    }
}
